import { IToolTipItem } from "../../../../../../com/mui/manager/IToolTipItem";
import { ItemData } from "../../../../resource/info/ItemData";
import { BaseItem } from "../../../common/BaseItem";
import { ItemsUtil } from "../../../shortcuts/item/ItemsUtil";
import { GlobalClass } from "../../../../../../com/mui/core/GlobalClass";
import { ImagesConst } from "../../../../resource/ImagesConst";
import { ToolTipsManager } from "../../../../../../com/mui/manager/ToolTipsManager";
import { FilterConst } from "../../../../../component/gconst/FilterConst";
import { EPlayerItemPosType } from "../../../../../../Message/Public/EPlayerItemPosType";
import { Language } from "../../../../../../extend/language/Language";
//class SkillRuneComposeComfirmStuffIcon
    
    export  class SkillRuneComposeComfirmStuffIcon /* flash.display.Sprite */ implements IToolTipItem
    {
        constructor(arg1: ItemData)
        {
            
            this._itemData = arg1;
            var loc1=new BaseItem();
            loc1.isShowLock = ItemsUtil.isBind(this._itemData);
            var loc2=GlobalClass.getBitmap(ImagesConst.PackItemBg);
            loc2.x = -3;
            loc2.y = -3;
            loc1.addChildAt(loc2, 0);
            loc1.itemData = arg1;
            loc1.amount = 1;
            loc1.width = 32;
            loc1.height = 32;
            loc1.isDragAble = false;
            loc1.isDropAble = false;
            this.addChild(loc1);
            ToolTipsManager.register(this);
            this.buttonMode = true;
            return;
        }

        public setSelectedView(): void
        {
            this.filters = [FilterConst.itemChooseFilter];
            return;
        }

        public clearSelectedView(): void
        {
            this.filters = [];
            return;
        }

        public get itemData(): ItemData
        {
            return this._itemData;
        }

        public get toolTipData()
        {
            var loc1="";
            var loc2="";
            if (this._itemData.posType != EPlayerItemPosType._EPlayerItemPosTypeBag) 
            {
                loc1 = Language.getString(80085);
            }
            else 
            {
                loc1 = Language.getString(80086);
            }
            if (ItemsUtil.isBind(this._itemData)) 
            {
                loc2 = Language.getString(80087);
            }
            else 
            {
                loc2 = Language.getString(80088);
            }
            this._toolTipData = Language.getStringByParam(80084, loc1, loc2);
            return this._toolTipData;
        }

        public set toolTipData(arg1)
        {
            return;
        }

        /* internal */ /* var */_toolTipData;

        /* internal */ /* var */_itemData: ItemData;
    }
